﻿<UserControl x:Class="Peter.View.ViewWeb"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             xmlns:a="http://schemas.awesomium.com/winfx"
             xmlns:logic="clr-namespace:Peter.Logic"
             xmlns:icons="clr-namespace:Peter.Common.Icons;assembly=Peter.Common"
             d:DesignHeight="300" d:DesignWidth="300"
             d:DataContext="{d:DesignInstance logic:ModelWeb}">
   <Grid>
      <Grid.RowDefinitions>
         <RowDefinition Height="Auto" />
         <RowDefinition Height="*" />
         <RowDefinition Height="Auto" />
      </Grid.RowDefinitions>

      <Border Background="#D8D8D9">
         <Grid Margin="2,2,2,4">
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="Auto" />
               <ColumnDefinition Width="Auto" />
               <ColumnDefinition Width="Auto" />
               <ColumnDefinition Width="*" />
               <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Button Grid.Column="0"
                    Margin="2,0"
                    Click="OnBack">
               <icons:IconDisplay Icon="Pageback"
                                  IconSize="MediumLarge" />
            </Button>
            <Button Grid.Column="1"
                    Margin="2,0"
                    Click="OnForward">
               <icons:IconDisplay Icon="Pageforward"
                                  IconSize="MediumLarge" />
            </Button>
            <Button Grid.Column="2"
                    Margin="2,0"
                    Click="OnReload">
               <icons:IconDisplay Icon="Refresh"
                                  IconSize="MediumLarge" />
            </Button>
            <TextBox Grid.Column="3"
                     x:Name="AddressBox"
                     KeyDown="OnAddressKeyDown"/>
            <Button Grid.Column="4"
                    Margin="2,0"
                    Click="OnNavigate">
               <icons:IconDisplay Icon="ArrowRight"
                                  IconSize="MediumLarge" />
            </Button>
         </Grid>
      </Border>
      
      <a:WebControl Grid.Row="1"
                    x:Name="WebControl"/>
      
      <StatusBar Grid.Row="2">
         <TextBlock Text="{Binding ElementName=WebControl, Path=TargetURL}"
                    FontSize="10"/>
      </StatusBar>
   </Grid>
</UserControl>
